package tmp;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Iterator;

public class ReflectTest {
	public static void main(String[] args) throws ClassNotFoundException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
		Class<?> clazz = Class.forName("tmp.Me");
		Class<?> spClass = clazz.getSuperclass();
		
		System.out.println(spClass.getName());
		Method[] methods = clazz.getDeclaredMethods();
		System.out.println(methods[1].invoke(new Me(12000)));
		for(Method m : methods){
			System.out.println(m.getName() + " " + m.isAccessible());
		}
	}
}
